<template>
    <div>
        <h1>[{{form.reportName}}] - 检测报告详情</h1>
        <!--        这里是详情-->
        <iframe :src='`https://view.xdocin.com/xdoc?_xdoc=http://123.166.135.171:8123/api/file/${form.checkForm}`' style='width: 100%;height: 100%'></iframe>
    </div>
</template>

<script lang='ts'>
import { defineComponent, reactive } from 'vue'
import { useRoute } from 'vue-router'
import { getCheckTypeById } from '/@/api/CheckType'

export default defineComponent({
    name: 'CheckTypeCheckFormDetail',
    components: {},

    setup: function(props, { attrs, slots }) {
        const route = useRoute()
        const form = reactive({})

        getCheckTypeById(route.params.id)
            .then(res => {
                for (let resKey in res.data.data) {
                    form[resKey] = res.data.data[resKey]
                }
            })
        console.log(form)
        // 根据路由传过来的id获取详情
        return {
            form
        }
    }
})
</script>

<style>
.el-scrollbar__view,.page.m-3.relative{
    height: 100%;
}
</style>
